import request from '@/util/request'

export const permissionAdd = (data: any) => {
  return request({
    url: '/permission',
    method: 'POST',
    data: data
  })
}
export const permissionRemove = (id: number) => {
  return request({
    url: '/permission',
    method: 'DELETE',
    params: {
      id: id
    }
  })
}
export const permissionModify = (data: any) => {
  return request({
    url: '/permission',
    method: 'PUT',
    data: data
  })
}
export const permissionFind = (pageInfo: any) => {
  return request({
    url: '/permission/list',
    method: 'GET',
    params: pageInfo
  })
}
export const permissionFindById = (id: number) => {
  return request({
    url: '/permission',
    method: 'GET',
    params: {
      id: id
    }
  })
}
